<template>
	<view class="writeoff-records-container">
		<!-- 蓝色背景区域 -->
		<view class="blue-background">
		
			<!-- 搜索栏 -->
			<view class="search-section">
				<view class="search-bar">
					<input class="search-input" placeholder="输入需要搜索的内容" v-model="searchText" />
					<view class="search-icon">🔍</view>
				</view>
			</view>
		</view>

		<!-- 核销记录列表 - 重叠在蓝色背景上 -->
		<view class="records-container">
			<view class="record-card" v-for="(record, index) in writeoffRecords" :key="index">
				<view class="record-content">
					<text class="service-name">{{ record.serviceName }}</text>
					<view class="divider"></view>
					<text class="user-info">下单用户:{{ record.userName }}</text>
					<text class="amount-info">实付金额:¥{{ record.amount }}</text>
					<text class="writeoff-time">核销时间:{{ record.writeoffTime }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchText: '',
				writeoffRecords: [
					{
						serviceName: '普通洗车、机油、工时',
						userName: '张三',
						amount: '32.00',
						writeoffTime: '2022-10-12 11:09'
					},
					{
						serviceName: '普通洗车、机油、工时',
						userName: '张三',
						amount: '32.00',
						writeoffTime: '2022-10-12 11:09'
					},
					{
						serviceName: '普通洗车、机油、工时',
						userName: '张三',
						amount: '32.00',
						writeoffTime: '2022-10-12 11:09'
					},
					{
						serviceName: '普通洗车、机油、工时',
						userName: '张三',
						amount: '32.00',
						writeoffTime: '2022-10-12 11:09'
					},
					{
						serviceName: '普通洗车、机油、工时',
						userName: '张三',
						amount: '32.00',
						writeoffTime: '2022-10-12 11:09'
					}
				]
			}
		},
		methods: {
			
		}
	}
</script>

<style scoped>
.writeoff-records-container {
	min-height: 100vh;
	background-color: #f5f5f5;
	position: relative;
}

/* 蓝色背景区域 */
.blue-background {
	background: #3183FB;
	height: 300rpx;
	position: relative;
	z-index: 1;
	overflow: hidden;
	padding: 0 20rpx;
}

/* 页面标题 */
.page-title {
	position: absolute;
	top: 10rpx;
	left: 0;
	right: 0;
	text-align: center;
	z-index: 20;
}

.title-text {
	color: white;
	font-size: 42rpx;
	font-weight: 600;
	letter-spacing: 2rpx;
	text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
}

/* 搜索栏 */
.search-section {
	position: absolute;
	top: 80rpx;
	left: 20rpx;
	right: 20rpx;
	z-index: 10;
}

.search-bar {
	background: white;
	border-radius: 25rpx;
	padding: 20rpx 30rpx;
	display: flex;
	align-items: center;
	box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
}

.search-input {
	flex: 1;
	font-size: 28rpx;
	color: #333;
	border: none;
	outline: none;
}

.search-input::placeholder {
	color: #999;
}

.search-icon {
	font-size: 32rpx;
	color: #666;
	margin-left: 20rpx;
}

/* 核销记录容器 - 重叠在蓝色背景上 */
.records-container {
	margin: -80rpx 20rpx 40rpx 20rpx;
	position: relative;
	z-index: 2;
}

/* 独立的记录卡片 */
.record-card {
	background: white;
	border-radius: 20rpx;
	box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
	margin-bottom: 20rpx;
	overflow: hidden;
	transition: all 0.3s ease;
}

.record-card:hover {
	box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.15);
	transform: translateY(-2rpx);
}

.record-card:last-child {
	margin-bottom: 0;
}

.record-content {
	display: flex;
	flex-direction: column;
	gap: 8rpx;
	padding: 30rpx 32rpx;
}

/* 分隔线 */
.divider {
	height: 1rpx;
	background-color: #e5e5e5;
	margin: 12rpx 0;
}

.service-name {
	font-size: 32rpx;
	color: #2c3e50;
	font-weight: 600;
	line-height: 1.4;
}

.user-info {
	font-size: 26rpx;
	color: #7f8c8d;
	line-height: 1.4;
	font-weight: 400;
}

.amount-info {
	font-size: 26rpx;
	color: #7f8c8d;
	line-height: 1.4;
	font-weight: 400;
}

.writeoff-time {
	font-size: 24rpx;
	color: #95a5a6;
	line-height: 1.4;
	font-weight: 400;
}
</style>
